﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp1
{
   
    public class StringToHumanTypeConverter:TypeConverter
    {
        public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
        {
            if (value is string) {
                Human h = new Human();
                h.Name = (string)value;
               return h;

            }

            return base.ConvertFrom(context, culture, value);
        }
    }
}
